package com.liuqi.knet.rpc.cluster;

import com.liuqi.knet.remoting.ChannelHandler;
import com.liuqi.knet.remoting.transport.AbstractClient;
import com.liuqi.knet.remoting.transport.netty.NettyClient;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * 集群配置
 *
 * @author liuqi
 * @date 2025/3/6 15:25
 **/
@Getter
@Setter
@ToString
public class ClusterConfig {

    /**
     * 客户端实现类
     */
    private Class<? extends AbstractClient> clientImpl = NettyClient.class;

    /**
     * 通道事件处理器
     */
    private ChannelHandler channelHandler;

    /**
     * 集群节点地址
     */
    private LoadBalanceNode balanceNode;

    /**
     * 负载均衡选择器
     */
    private LoadBalance loadBalance;

    /**
     * 消息发送失败后的重试次数
     */
    private int sendRetry = 3;

}
